package com.jml;
import java.io.*;

import java.util.ArrayList;
public class 创建文本文件 {

    public static void main(String[] args) throws IOException {
        WriteDate();
    }

    public static void WriteDate() throws IOException {
        BufferedWriter output = null;
         try{
            File file = new File("D:/banzhang.txt");
            if(file.exists()) {
                file.delete();
            }
            file.createNewFile();
            output = new BufferedWriter(new FileWriter(file));
            ArrayList ResolveList = new ArrayList();
             for (int i = 0; i < 10; i++) {
                 ResolveList.add(Math.random()* 100);
             }
             for (int j = 0; j < 10000000; j++) {
                 for (int i=0 ;i<10;i++){
                     output.write(String.valueOf(ResolveList.get(i)) + "\n");
                 }
             }
        } catch (Exception ex) {
            System.out.println(ex);
        }finally {
             output.close();
         }
    }
}
